package com.xydtech.ecard.ftp.enums;

/**
 * @Author: liliya
 * @Description: sys_dict_data  还款频率(月)
 * TODO 当还款方式loanRepaymentModeType为等额本金和等额本息必填
 * 1M	1	repayment_frequency_type
 * 3M	3	repayment_frequency_type
 * 6M   6	repayment_frequency_type
 * 12M	12	repayment_frequency_type
 * @Date: Created in 2023/8/15 19:25
 * @Modified:
 */

public enum FtpRepaymentFrequencyTypeEnum {

    REPAYMENT_FREQUENCY1(1,"1M"),
    REPAYMENT_FREQUENCY2(3,"3M"),
    REPAYMENT_FREQUENCY3(6,"6M"),
    REPAYMENT_FREQUENCY4(12,"12M");

    private int value;
    private String label;

    FtpRepaymentFrequencyTypeEnum(int value, String label) {
        this.value = value;
        this.label = label;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static FtpRepaymentFrequencyTypeEnum values(int code){
        for(FtpRepaymentFrequencyTypeEnum enums : FtpRepaymentFrequencyTypeEnum.values()){
            if(enums.getValue() == code){
                return enums;
            }
        }
        return null;
    }

}
